﻿<%@ Page Title="" Language="C#" MasterPageFile="~/travel-flights/Travel_Flights.master" AutoEventWireup="true" CodeFile="flights-search.aspx.cs" Inherits="travel_flights_flights_search_new" EnableEventValidation="false"
    ValidateRequest="false" %>

<%@ Register Src="../controls/usrCompanyBigLogoByServices.ascx" TagName="usrCompanyBigLogoByServices"
    TagPrefix="uc4" %>
<%@ Register Src="../controls/usrIdType.ascx" TagName="usrIdType" TagPrefix="uc6" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="/includes/LoadingProgress.js" type="text/javascript"></script>

    <script type="text/javascript">
        var MSGS = {
            change: 'change',
            cancel: 'cancel',
            destination: 'Destination',
            economy: 'Economy',
            business: 'Business',
            more_fares: 'more {country_code} fares',
            glocal_error_msg: 'Ooops! Nothing broke but we just do not have any recent data for the home airport you have entered. Please try again with a different home airport.'
        };

        var app_type = 'flights';
        var flights_api = 'http://www.wego.com/p/flights/locations/search?locale=en-US';
        var lang = 'en-us';
        var user_country_code = 'SG';
        var geoip_from_str = 'Singapore Changi Apt, Singapore (SIN)';
        var geoip_from_code = 'SIN';
        var geoip_user_country_code = 'SG';
        var geoip_ip = '';  
        
             
    </script>

    <script type="text/javascript" src="../js/wego.js"></script>

    <div class="elements_inner_wrapper">
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <div style="margin: 0 auto">
            <!-- #Include file="../includes/body_loader.inc" -->
        </div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
            AsyncPostBackTimeout="36000">
        </asp:ScriptManager>

        <script type="text/javascript">
            IncreaseProgress(10);
        </script>

        
        <div class="row">
            <asp:ValidationSummary ID="ValidationSummary1" HeaderText="Oops Please complete the form."
                runat="server" ValidationGroup="travel_insurance" CssClass="errorSummary" />
        </div>
        <div class="seperator">
        </div>
        <div class="left w575px">
            <div class="seperator">
            </div>

            <script type="text/javascript">                IncreaseProgress(40);</script>

            <div class="searchbox">
                <div class="top">
                    <div class="tabs">
                        <div class="left">
                            <ul>
                                <li><a href="#" class="home">Flights</a></li>
                            </ul>
                        </div>
                        <div class="_right txtright">
                            <h1>
                                Find the cheapest flight with CompareXpress Cheap Flights</h1>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
                <div style="margin-left:18px; display:none;"> <br /><br /><strong>WE ARE IN THE MIDST OF UPGRADING OUR FLIGHTS' ENGINE TO INCLUDE MORE AIRLINES. DO CHECK BACK AGAIN SOON.</strong> </div>
                <div class="body" >
                    <div class="seperator">
                    </div>
                    <h1>
                        Compare multiple sites to find the best price!</h1>
                    <div class="seperator">
                    </div>
                    <div>
                        <strong>TRIP TYPE</strong>
                        <input id="wg_roundTrip" type="radio" name="wg_trip_type" checked="checked" value="true" />
                        <label for="wg_roundTrip">
                            Round-trip</label>
                        <input id="wg_oneWay" type="radio" name="wg_trip_type" value="false" />
                        <label for="wg_oneWay">
                            One-way</label>
                    </div>
                    <div class="seperator">
                    </div>
                    <div class="left">
                        <strong>FROM</strong><br />
                        <input id="wg_origin" type="text" name="wg_origin" tabindex="1" size="36" class="input" />
                        <input id="wg_origin_code" type="hidden" value="" name="wg_from" class="hidden" />
                    </div>
                    <div class=" pad_15 left">
                    </div>

                    <script type="text/javascript">
                        IncreaseProgress(50);
                    </script>

                    <div class="left">
                        <strong>TO</strong><br />
                        <input id="wg_destination" type="text" name="wg_destination" tabindex="2" size="36"
                            class="input" placeholder="Enter airport or city" />
                        <input id="wg_destination_code" type="hidden" value="" name="wg_to" class="hidden" />
                    </div>
                    <div class="seperator">
                    </div>
                    <div class="details">
                        <div class="top">
                            <div style="height: 3px;">
                            </div>
                            <div style="padding-left: 15px">
                                <h1>
                                    Details</h1>
                            </div>
                        </div>
                        <div class="body">
                            <div>
                                <div class="left">
                                    <strong>Depart</strong> <em>(dd/mm/yyyy)</em><br />
                                    <input id="wg_outbound_date" type="text" name="wg_outbound_date" tabindex="3" readonly="readonly"
                                        class="input" /></div>
                                <div class="pad_5 left">
                                </div>
                                <div class="left">
                                    <strong>Return</strong> <em>(dd/mm/yyyy)</em><br />
                                    <input id="wg_inbound_date" type="text" name="wg_inbound_date" tabindex="5" readonly="readonly"
                                        class="input" /></div>
                                <div class="pad_5 left">
                                </div>
                                <div class="left">
                                    <strong>Adults</strong> <em>(age 12+)</em><br />
                                    <div style="width: 85px">
                                        <select id="wg_adult" name="wg_adult" tabindex="7" runat="server" class="right">
                                            <option>1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                            <option>2</option>
                                            <option>3</option>
                                            <option>4</option>
                                            <option>5</option>
                                            <option>6</option>
                                            <option>7</option>
                                            <option>8</option>
                                            <option>9</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="pad_5 left">
                                </div>

                                <script type="text/javascript">
                                    IncreaseProgress(60);
                                </script>

                                <div class="left">
                                    <strong>Children</strong> <em>(age 2-11)</em><br />
                                    <div style="width: 100px">
                                        <select id="wg_children" name="wg_children" tabindex="8" class="right">
                                            <option>0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                            <option>1</option>
                                            <option>2</option>
                                            <option>3</option>
                                            <option>4</option>
                                            <option>5</option>
                                            <option>6</option>
                                            <option>7</option>
                                            <option>8</option>
                                            <option>9</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </div>
                        <div class="bottom">
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(70);
                        </script>

                    </div>
                    <div class="seperator">
                    </div>
                    <div class="right">
                        <!-- COMPARE BUTTON [[[[ old one ]]] -->
                        <!-- COMPARE BUTTON [[[[ old one ]]] -->
                        <!-- COMPARE BUTTON [[[[ NEW ONE ]]] -->
                        <asp:Button ID="start" CssClass="button_search" onmousedown="this.className = 'button_search_mousedown';"
                            onmouseup="this.className = 'button_search';" onmouseout="this.className = 'button_search';"
                            OnClick="btnSearch_Click" OnClientClick="if (checkValidation()){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}else{return false;}"
                            runat="server" Style="margin-right: 7px;" />
                        <!-- COMPARE BUTTON [[[[ NEW ONE ]]] -->
                    </div>
                    <div>
                        <asp:Label ID="lblMessage" runat="server" Font-Bold="true" ForeColor="Red" Visible="false"></asp:Label>
                    </div>
                </div>
                <div class="bottom">
                    <!-- <h1>The fastest way to start your online holiday planning.</h1> -->
                </div>
            </div>
        </div>

        <script type="text/javascript">
            IncreaseProgress(80);
        </script>

        <div class="left" style="width: 222px;">
        </div>
        <div class="right" style="width: 370px;">
            <a href="/travel-insurance/"><img src="/images/flights/tag_flights.png" alt="Compare and buy cheap flights directly from Airlines"
                title="Compare and buy budget flights directly from Airlines" style="padding-top: 50px" /></a>
            <div class="seperator"></div>
        </div>
        <div class="seperator">
        </div>

        <script type="text/javascript">
            IncreaseProgress(90);
        </script>

    </div>

    <script type="text/javascript">
        //<![CDATA[ 

        function checkValidation() {
            var isvalid = new Boolean(ValidateSearchFields());
            //alert(isvalid);
            if (isvalid.toString() == 'true') {
                return true;
            }
            else {
                return false;
            }

        }

        function JT_init() {
            $("a.jTip")
		   .hover(function() { JT_show(this.href, this.id, this.name) }, function() { $('#JT').remove() })
           .click(function() { return false });
        }

        document.getElementById('wg_origin').value = geoip_from_str;
        document.getElementById('wg_origin_code').value = geoip_from_code;


        IncreaseProgress(100);

        HideLoading();

        //]]>
    </script>

    <script src="/js/cxwego.js" type="text/javascript"></script>

</asp:Content>

